
class LoginAPI(object):
    def __init__(self):
        self.url_verify='http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify&r=0.6872613774313587'
        self.url_login='http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login&t=0.030352310829772078'
        self.Headers={'Content-Type':'application/x-www-form-urlencoded'}

    def login(self,my_session,re_data):
        my_session.get(url=self.url_verify)
        resp=my_session.post(url=self.url_login,headers=self.Headers,
                        data=re_data)
        return resp